﻿using System;

namespace ReactiveOAuth
{

    /// <summary>
    /// WebRequest HttpMethodType.
    /// </summary>
    public enum MethodType
    {
        Get,
        Post,
        Delete
    }

    public static class MethodTypeExtensions
    {

        /// <summary>
        /// Convert to UPPERCASE string.
        /// </summary>
        public static string ToUpperString(this MethodType methodType)
        {
            switch (methodType)
            {
                case MethodType.Get:
                    return "GET";
                case MethodType.Post:
                    return "POST";
                case MethodType.Delete:
                    return "DELETE";
                default:
                    throw new ArgumentException();
            }
        }

    }

}